﻿using System;

namespace BSharp.Compiler.Emit
{
	public class PopArgument : IntermediateInstruction
	{
		public readonly int Register;
		public readonly int Index;

		public PopArgument (int register, int index)
		{
			Register = register;
			Index = index;
		}

		public override void Visit (IntermediateCompiler compiler)
		{
			compiler.Compile (this);
		}

		public override string ToString ()
		{
			return String.Format ("POP_ARG l{0}", Index);
		}
	}
}

